home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
packet
/
p_tapr
/
tnchst
/
mthost.c
< prev
next >
Wrap
Text File
|
1991-08-18
|
7KB
|
142 lines
/*************************************************************
* TNC-2 HOST MODE TEST PROGRAM
*
*
* This code should be compiled with Microsoft C and
* further linked with MTHDRIVER.OBJ.
*************************************************************/
/** develop list below from compiling w/ option /Zg */
/*#if LINT_ARGS*/
/*global*/ int AUXRDY(void );
/*global*/ void moncall(unsigned char *);
/*global*/ void monframe(unsigned char *,int );
/*global*/ int makupper(char *);
/*global*/ int iswhite(char );
/*global*/ unsigned char *atocall(unsigned char *,char *);
/*global*/ char *calltoa(unsigned char *,char *);
/*global*/ void cdecl aftr_init(void );
/*global*/ int cdecl aftr_handler(struct itm_struct *);
/*global*/ int aftr_proc(unsigned char );
/*global*/ void aftt_send_bin(unsigned char );
/*global*/ void aftt_send_data(unsigned char );
/*global*/ int cdecl aftt_send(struct itm_struct *);
/*global*/ void cdecl dlc_init(void );
/*global*/ void cdecl dlc_timer_retry_reset(struct dlccb_struct *);
/*global*/ void cdecl dlc_event(unsigned char ,struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_timer_tick(void );
/*global*/ void cdecl dlc_data_init(struct dlccb_struct *);
/*global*/ void cdecl send_dlc_fr(struct dlccb_struct *,unsigned char ,unsigned char *,unsigned int );
/*global*/ void cdecl send_resetack(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl send_dlcdack(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_ring_in(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_ring_out(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_retryfail(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_retryreset(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_senddata(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_dataproc(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl dlc_ackproc(struct dlccb_struct *,struct dlc_frame_struct *,unsigned int );
/*global*/ void cdecl aft_in_handler(struct dlc_frame_struct *,unsigned int );
/*global*/ void dlc_start_cmd(void );
/*global*/ int cdecl dlc_data_cmd(unsigned char *,unsigned int );
/*global*/ int dlc_data_handler(unsigned char *,unsigned int );
/*global*/ void cdecl blp_init(void );
/*global*/ void cdecl blp_timer_retry_reset(struct blpcb_struct *);
/*global*/ void cdecl blp_event(unsigned char ,struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl blp_timer_tick(void );
/*global*/ void cdecl blp_data_init(struct blpcb_struct *);
/*global*/ void cdecl send_blp_fr(struct blpcb_struct *,unsigned char ,unsigned char *,unsigned int );
/*global*/ int cdecl send_blp_datagram(unsigned char ,unsigned char *,unsigned int );
/*global*/ struct blpcb_struct *cdecl find_lcn(unsigned char );
/*global*/ void cdecl send_cclrd(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl send_dack(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl send_dbusy(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl send_cstrep(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl send_cstenq(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl ring_in(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl collide(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl answered(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl caller_rdy(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl clr_reply(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl stopblp(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl retryfail(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl retrycs(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl retrycc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl retrycclr(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl senddata(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl dataproc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl ackproc(struct blpcb_struct *,struct bframe_struct *,unsigned int );
/*global*/ void cdecl dlc_in_handler(struct bframe_struct *,unsigned int );
/*global*/ struct blpcb_struct *cdecl blp_start_cmd(unsigned char ,char *);
/*global*/ int cdecl blp_data_cmd(struct blpcb_struct *,unsigned char *,unsigned int );
/*global*/ void blp_stop_cmd(struct blpcb_struct *);
/*global*/ void blp_status_cmd(struct blpcb_struct *);
/*global*/ unsigned char cdecl blp_start_handler(struct blpcb_struct *);
/*global*/ void cdecl blp_connected_handler(unsigned char );
/*global*/ void cdecl blp_stop_handler(unsigned char );
/*global*/ int blp_data_handler(unsigned char ,unsigned char *,unsigned int );
/*global*/ long disk_free(void );
/*global*/ void updonemsg(void );
/*global*/ int donada(int );
/*global*/ void print_help(void );
/*global*/ void set_upfile(void );
/*global*/ void set_dwnfile(void );
/*global*/ void cdecl kbd_blp_call(void );
/*global*/ void cdecl kbd_blp_data(void );
/*global*/ void cdecl kbd_blp_datagram(void );
/*global*/ void cdecl kbd_blp_stop(void );
/*global*/ void cdecl kbd_send_cstenq(void );
/*global*/ void cdecl set_dlc_addr(void);
/*global*/ void cdecl cmdproc(int );
/*global*/ void totnc_proc(void );
/*global*/ void fmtnc_proc(void );
/*global*/ int blp_tick_test(void );
/*global*/ int main(int ,char * *);
/*#endif*/ /* endif LINTARGS -- now removed */
#include "hostlit.inc"
#include <stdio.h>
#include <stdlib.h>
#include <v2tov3.h>
#include <process.h>
#include <dos.h>
#include <conio.h>
#include <signal.h>
#include <time.h>
#include <io.h>
#include <memory.h>
#include <ctype.h>
#include <sys\timeb.h>
#include <sys\types.h>
#include "mt.lit"
#define ASMAUX 1
#define ADJASPECT 1 /* TRUE when we crunch pix by 25% */
#define COMPORT 0
#define GDEBUG 0
extern int near cdecl AUXAVAIL(void);
extern int near cdecl GETAUX(void);
/* extern int near cdecl AUXRDY(void); */
extern void near cdecl PUTAUX( byte );
int AUXRDY() { return( TRUE ); } /** FAKE OUT FOR HOST - NO FLW*/
#include "ax25.c"
#include "aft.c"
#include "dlc.c"
#include "blp.c"
#include "mthcode.c"